From ad199cc0a13234514ecb6d279ebb87fc60093bbb Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Tue, 13 Jun 2023 22:54:23 +0200 Subject: [PATCH] gdk/wayland: Return pad devices querying for all devices These devices unfortunately didn't ever get a capability flag in 3.24 (fixed in GTK4). We are very far off into maintenance grounds that it is not ideal to add new flag values, but we could however return these devices if GDK_SEAT_CAPABILITY_ALL is being asked. Do that, so it is possible to deal with pad devices, even if it's not possible to query them specifically. Forwarded: https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/6049 Origin: 3.24.39, commit:a9d7198d63d14e049c399914f11ddd37fc034f3a Gbp-Pq: Name gdk-wayland-Return-pad-devices-querying-for-all-devices.patch --- gdk/wayland/gdkdevice-wayland.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/gdk/wayland/gdkdevice-wayland.c b/gdk/wayland/gdkdevice-wayland.c index dd7db81cf1..a1e4771a74 100644 --- a/gdk/wayland/gdkdevice-wayland.c +++ b/gdk/wayland/gdkdevice-wayland.c @@ -5141,6 +5141,21 @@ gdk_wayland_seat_get_slaves (GdkSeat *seat, } } + /* There is no specific capability for pads, return + * them anyways if all devices are requested + */ + if (capabilities == GDK_SEAT_CAPABILITY_ALL) + { + GList *l; + + for (l = wayland_seat->tablet_pads; l; l = l->next) + { + GdkWaylandTabletPadData *pad = l->data; + + slaves = g_list_prepend (slaves, pad->device); + } + } + return slaves; } -- 2.30.2